{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "b5e94cce-98bb-4a38-97b9-cd61db047785",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pyecharts.options as opts\n",
    "from pyecharts.charts import Bar\n",
    "from pyecharts.charts import Line\n",
    "\n",
    "# 直接在pyecharts中生成模拟数据\n",
    "from pyecharts.faker import Faker\n",
    "\n",
    "#在jupyter notebook演示\n",
    "from pyecharts.globals import CurrentConfig, NotebookType \n",
    "CurrentConfig.NOTEBOOK_TYPE = NotebookType.NTERACT"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "170e7053-10ec-4669-a526-347d77827026",
   "metadata": {},
   "outputs": [],
   "source": [
    "#导入数据\n",
    "x_data = Faker.guangdong_city\n",
    "\n",
    "y_data1 = Faker.values()\n",
    "y_data2 = Faker.values()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "5873a5b2-bf4f-4d5a-92b5-683e7411e1c4",
   "metadata": {},
   "outputs": [],
   "source": [
    "#画图\n",
    "bar = (Bar(\n",
    "    init_opts=opts.InitOpts(\n",
    "        width=\"1000px\",\n",
    "        height=\"500px\")\n",
    ")\n",
    "    .add_xaxis(x_data)\n",
    "    .add_yaxis(\"蒸发量\", y_data1)\n",
    "    .add_yaxis(\"降水量\", y_data2)\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(\n",
    "            title = \"广东省各地降雨\",\n",
    "            subtitle = \"2022/5\"\n",
    "        )\n",
    "    )\n",
    "    .set_series_opts(\n",
    "        label_opts = opts.LabelOpts(is_show=False),\n",
    "        markpoint_opts = opts.MarkPointOpts(\n",
    "            data=[\n",
    "                opts.MarkPointItem(type_ = \"max\", name = \"最大值\")]\n",
    "        )\n",
    "    )\n",
    "      )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "27345069-cf09-419d-84e4-783ee4fbc358",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<!DOCTYPE html>\n",
       "<html>\n",
       "<head>\n",
       "    <meta charset=\"UTF-8\">\n",
       "    <title>Awesome-pyecharts</title>\n",
       "            <script type=\"text/javascript\" src=\"https://assets.pyecharts.org/assets/echarts.min.js\"></script>\n",
       "\n",
       "</head>\n",
       "<body>\n",
       "    <div id=\"8ce93303b7bf4db49b84bd0b36015c94\" class=\"chart-container\" style=\"width:1000px; height:500px;\"></div>\n",
       "    <script>\n",
       "        var chart_8ce93303b7bf4db49b84bd0b36015c94 = echarts.init(\n",
       "            document.getElementById('8ce93303b7bf4db49b84bd0b36015c94'), 'white', {renderer: 'canvas'});\n",
       "        var option_8ce93303b7bf4db49b84bd0b36015c94 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\\u84b8\\u53d1\\u91cf\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                29,\n",
       "                87,\n",
       "                26,\n",
       "                106,\n",
       "                145,\n",
       "                39,\n",
       "                141\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"inside\",\n",
       "                    \"color\": \"#fff\",\n",
       "                    \"margin\": 8\n",
       "                },\n",
       "                \"data\": [\n",
       "                    {\n",
       "                        \"name\": \"\\u6700\\u5927\\u503c\",\n",
       "                        \"type\": \"max\"\n",
       "                    }\n",
       "                ]\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\\u964d\\u6c34\\u91cf\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                68,\n",
       "                120,\n",
       "                136,\n",
       "                132,\n",
       "                147,\n",
       "                123,\n",
       "                118\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"inside\",\n",
       "                    \"color\": \"#fff\",\n",
       "                    \"margin\": 8\n",
       "                },\n",
       "                \"data\": [\n",
       "                    {\n",
       "                        \"name\": \"\\u6700\\u5927\\u503c\",\n",
       "                        \"type\": \"max\"\n",
       "                    }\n",
       "                ]\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u84b8\\u53d1\\u91cf\",\n",
       "                \"\\u964d\\u6c34\\u91cf\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u84b8\\u53d1\\u91cf\": true,\n",
       "                \"\\u964d\\u6c34\\u91cf\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u6c55\\u5934\\u5e02\",\n",
       "                \"\\u6c55\\u5c3e\\u5e02\",\n",
       "                \"\\u63ed\\u9633\\u5e02\",\n",
       "                \"\\u9633\\u6c5f\\u5e02\",\n",
       "                \"\\u8087\\u5e86\\u5e02\",\n",
       "                \"\\u5e7f\\u5dde\\u5e02\",\n",
       "                \"\\u60e0\\u5dde\\u5e02\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5e7f\\u4e1c\\u7701\\u5404\\u5730\\u964d\\u96e8\",\n",
       "            \"subtext\": \"2022/5\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "        chart_8ce93303b7bf4db49b84bd0b36015c94.setOption(option_8ce93303b7bf4db49b84bd0b36015c94);\n",
       "    </script>\n",
       "</body>\n",
       "</html>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x7fab18baf190>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bar.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "29c61ecc-88a8-47b0-b353-fc452173ee5f",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 柱状图&折线图结合\n",
    "#导入数据\n",
    "x_data = Faker.guangdong_city\n",
    "\n",
    "y_data1 = Faker.values()\n",
    "y_data2 = Faker.values()\n",
    "y_data3 = 2.0, 2.2, 3.3, 4.5, 3.2, 10.5, 12.4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "a4c2865c-5220-4344-9b01-e713c1544db8",
   "metadata": {},
   "outputs": [],
   "source": [
    "#画图\n",
    "bar = (Bar(\n",
    "    init_opts=opts.InitOpts(\n",
    "        width=\"1000px\",\n",
    "        height=\"500px\")\n",
    ")\n",
    "    .add_xaxis(x_data)\n",
    "    .add_yaxis(\"蒸发量\", y_data1)\n",
    "    .add_yaxis(\"降水量\", y_data2)\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(\n",
    "            title = \"广东省各地降雨\",\n",
    "            subtitle = \"2022/5\"\n",
    "        )\n",
    "    )\n",
    "    .set_series_opts(\n",
    "        label_opts = opts.LabelOpts(is_show=False),\n",
    "        markpoint_opts = opts.MarkPointOpts(\n",
    "            data=[\n",
    "                opts.MarkPointItem(type_ = \"max\", name = \"最大值\")]\n",
    "        )\n",
    "    )\n",
    "     .extend_axis(\n",
    "        yaxis=opts.AxisOpts(\n",
    "            name=\"温度\",\n",
    "            type_=\"value\",\n",
    "            min_=0,\n",
    "            max_=25,\n",
    "            interval=5,\n",
    "            axislabel_opts=opts.LabelOpts(formatter=\"{value} °C\"),\n",
    "        )\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        tooltip_opts=opts.TooltipOpts(\n",
    "            is_show=True, trigger=\"axis\", axis_pointer_type=\"cross\"),\n",
    "        xaxis_opts=opts.AxisOpts(\n",
    "            # type_=\"category\",\n",
    "            # axispointer_opts=opts.AxisPointerOpts(is_show=True,\n",
    "            #                                       type_=\"shadow\")\n",
    "        ),\n",
    "        yaxis_opts=opts.AxisOpts(\n",
    "            name=\"水量\",\n",
    "            type_=\"value\",\n",
    "            min_=0,\n",
    "            max_=200,\n",
    "            interval=50,\n",
    "            axislabel_opts=opts.LabelOpts(formatter=\"{value} ml\"),\n",
    "            axistick_opts=opts.AxisTickOpts(is_show=True),\n",
    "            splitline_opts=opts.SplitLineOpts(is_show=True)\n",
    "        )\n",
    "    )\n",
    ")\n",
    "\n",
    "line = (\n",
    "    Line()\n",
    "    .add_xaxis(xaxis_data=x_data)\n",
    "    .add_yaxis(\"平均温度\", y_data3,\n",
    "               yaxis_index=1,\n",
    "               label_opts=opts.LabelOpts(is_show=False)\n",
    "              )\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "5ca70594-8717-4a96-986d-2f03da182e76",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<!DOCTYPE html>\n",
       "<html>\n",
       "<head>\n",
       "    <meta charset=\"UTF-8\">\n",
       "    <title>Awesome-pyecharts</title>\n",
       "            <script type=\"text/javascript\" src=\"https://assets.pyecharts.org/assets/echarts.min.js\"></script>\n",
       "\n",
       "</head>\n",
       "<body>\n",
       "    <div id=\"8951186d50c54cf989dd10dc333682b9\" class=\"chart-container\" style=\"width:1000px; height:500px;\"></div>\n",
       "    <script>\n",
       "        var chart_8951186d50c54cf989dd10dc333682b9 = echarts.init(\n",
       "            document.getElementById('8951186d50c54cf989dd10dc333682b9'), 'white', {renderer: 'canvas'});\n",
       "        var option_8951186d50c54cf989dd10dc333682b9 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\\u84b8\\u53d1\\u91cf\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                52,\n",
       "                52,\n",
       "                56,\n",
       "                39,\n",
       "                37,\n",
       "                124,\n",
       "                73\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"inside\",\n",
       "                    \"color\": \"#fff\",\n",
       "                    \"margin\": 8\n",
       "                },\n",
       "                \"data\": [\n",
       "                    {\n",
       "                        \"name\": \"\\u6700\\u5927\\u503c\",\n",
       "                        \"type\": \"max\"\n",
       "                    }\n",
       "                ]\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\\u964d\\u6c34\\u91cf\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                72,\n",
       "                103,\n",
       "                105,\n",
       "                70,\n",
       "                95,\n",
       "                67,\n",
       "                117\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"inside\",\n",
       "                    \"color\": \"#fff\",\n",
       "                    \"margin\": 8\n",
       "                },\n",
       "                \"data\": [\n",
       "                    {\n",
       "                        \"name\": \"\\u6700\\u5927\\u503c\",\n",
       "                        \"type\": \"max\"\n",
       "                    }\n",
       "                ]\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u5e73\\u5747\\u6e29\\u5ea6\",\n",
       "            \"connectNulls\": false,\n",
       "            \"yAxisIndex\": 1,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"\\u6c55\\u5934\\u5e02\",\n",
       "                    2.0\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6c55\\u5c3e\\u5e02\",\n",
       "                    2.2\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u63ed\\u9633\\u5e02\",\n",
       "                    3.3\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9633\\u6c5f\\u5e02\",\n",
       "                    4.5\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u8087\\u5e86\\u5e02\",\n",
       "                    3.2\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5e7f\\u5dde\\u5e02\",\n",
       "                    10.5\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u60e0\\u5dde\\u5e02\",\n",
       "                    12.4\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u84b8\\u53d1\\u91cf\",\n",
       "                \"\\u964d\\u6c34\\u91cf\",\n",
       "                \"\\u5e73\\u5747\\u6e29\\u5ea6\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u84b8\\u53d1\\u91cf\": true,\n",
       "                \"\\u964d\\u6c34\\u91cf\": true,\n",
       "                \"\\u5e73\\u5747\\u6e29\\u5ea6\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"axis\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"cross\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u6c55\\u5934\\u5e02\",\n",
       "                \"\\u6c55\\u5c3e\\u5e02\",\n",
       "                \"\\u63ed\\u9633\\u5e02\",\n",
       "                \"\\u9633\\u6c5f\\u5e02\",\n",
       "                \"\\u8087\\u5e86\\u5e02\",\n",
       "                \"\\u5e7f\\u5dde\\u5e02\",\n",
       "                \"\\u60e0\\u5dde\\u5e02\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"type\": \"value\",\n",
       "            \"name\": \"\\u6c34\\u91cf\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"interval\": 50,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisTick\": {\n",
       "                \"show\": true,\n",
       "                \"alignWithLabel\": false,\n",
       "                \"inside\": false\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8,\n",
       "                \"formatter\": \"{value} ml\"\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"min\": 0,\n",
       "            \"max\": 200,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"value\",\n",
       "            \"name\": \"\\u6e29\\u5ea6\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"interval\": 5,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisLabel\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8,\n",
       "                \"formatter\": \"{value} \\u00b0C\"\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"min\": 0,\n",
       "            \"max\": 25,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "        chart_8951186d50c54cf989dd10dc333682b9.setOption(option_8951186d50c54cf989dd10dc333682b9);\n",
       "    </script>\n",
       "</body>\n",
       "</html>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x7fab18bf5f40>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bar.overlap(line).render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7c4f6d1d-53f7-4e8c-9c84-bd047ee6c123",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
